package net.phoenix.repository.dao;

import java.io.IOException;
import java.sql.Blob;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 
* Jigsaw server
* 
* @author    <a href="shamphone@gmail.com">Li XiongFeng</a>
* @date      2012-9-30
* @version   1.0.0
 */
public abstract class BlobValueLoaderDao extends JdbcDao {
	protected PreparedStatement command;
	protected ResultSet rs;

	public abstract Blob load(String table, String column, String nodeId) throws SQLException, IOException;

	public void close() throws SQLException {
		if (this.command != null)
			this.command.close();
		if (this.rs != null)
			this.rs.close();
		if(this.connection !=null)
			this.connection.close();
	}
}
